package com.ruoyi.project.system.proclamation.service.impl;

import com.ruoyi.common.utils.UuidUtil;
import com.ruoyi.common.utils.text.Convert;
import com.ruoyi.project.system.proclamation.domain.Proclamation;
import com.ruoyi.project.system.proclamation.mapper.ProclamationMapper;
import com.ruoyi.project.system.proclamation.service.IProclamationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 预约信息Service业务层处理
 *
 * Created by Administrator.
 *
 * @autor LCL - 2020/8/3 - 15:08.
 */
@Service
public class ProclamationServiceImpl implements IProclamationService 
{

    @Autowired
    private ProclamationMapper proclamationMapper;

    /**
     * 查询预约信息
     * 
     * @param id 预约信息ID
     * @return 预约信息
     */
    @Override
    public Proclamation selectProclamationById(String id)
    {
        return proclamationMapper.selectProclamationById(id);
    }

    /**
     * 查询预约信息列表
     * 
     * @param proclamation 预约信息
     * @return 预约信息
     */
    @Override
    public List<Proclamation> selectProclamationList(Proclamation proclamation)
    {
        return proclamationMapper.selectProclamationList(proclamation);
    }

    /**
     * 新增预约信息
     * 
     * @param proclamation 预约信息
     * @return 结果
     */
    @Override
    public int insertProclamation(Proclamation proclamation)
    {
        proclamation.setId(UuidUtil.get32UUID());
        return proclamationMapper.insertProclamation(proclamation);
    }

    /**
     * 修改预约信息
     * 
     * @param proclamation 预约信息
     * @return 结果
     */
    @Override
    public int updateProclamation(Proclamation proclamation)
    {
        return proclamationMapper.updateProclamation(proclamation);
    }

    /**
     * 删除预约信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteProclamationByIds(String ids)
    {
        return proclamationMapper.deleteProclamationByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除预约信息信息
     * 
     * @param id 预约信息ID
     * @return 结果
     */
    @Override
    public int deleteProclamationById(String id)
    {
        return proclamationMapper.deleteProclamationById(id);
    }
}
